package com.kun.portal.webframe.dao;

import com.kun.portal.webframe.po.*;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.Date;

/**
 * Created by Administrator on 2018/5/23.
 */
public interface GroundServiceSchedulingDao extends JpaRepository<GroundServiceScheduling, String>, JpaSpecificationExecutor<GroundServiceScheduling> {

//    @Query("select new com.kun.portal.webframe.po.GroundServiceFlightPlaneView(f,g) from GroundServiceSchedulings g join  g.Schedulings s RIGHT JOIN  FlightPlanePo f  on g.planeId = f.planeId  where f.flightInfo.flightInfoId=?1")
//    public Page<GroundServiceFlightPlaneView> findFlightInfoId(String key, Pageable pageable);
//
//    @Query("select new com.kun.portal.webframe.po.GroundServiceFlightPlaneView(f,g) from GroundServiceSchedulings g join  g.Schedulings s RIGHT JOIN  FlightPlanePo f  on g.planeId = f.planeId  where f.exceptDate>=?1")
//    public Page<GroundServiceFlightPlaneView> findFlightStartDate(Date date, Pageable pageable);
//
//    @Query("select new com.kun.portal.webframe.po.GroundServiceFlightPlaneView(f,g) from GroundServiceSchedulings g join  g.Schedulings s RIGHT JOIN  FlightPlanePo f  on g.planeId = f.planeId  where f.f.exceptDate<=?1")
//    public Page<GroundServiceFlightPlaneView> findFlightEndDate(Date Date, Pageable pageable);

}
